#include <iostream>
#include <map>
#include <string>
using namespace std;
/**
 * @brief 输入文本，统计其单词出现数目
 *
 * @return int
 */
int main() {
  map<string, int> words;

  for (string s; cin >> s;)
    ++words[s];

  for (const auto &p : words)
    cout << p.first << ": " << p.second << "\n";

  return 0;
}